import axios from '@/utils/axios';
// 公告资讯列表
export const getNoticeList = data => axios.post('/bnd-benefits/noticeInfo/list', data);
// 新增与修改公告资讯
export const saveAndUpdate = data => axios.post('/bnd-benefits/noticeInfo/saveAndUpdate', data);
// 上下线
export const onlineOrOffLine = data => axios.post('/bnd-benefits/noticeInfo/onlineOrOffLine', data);
// 删除
export function noticeDelete(data) {
  return axios.request({
    url: `/bnd-benefits/noticeInfo/delete/${data.id}`,
    method: 'delete',
    data: data,
  });
}
export function batchUploadImage(data) {
  return axios.request({
    url: `/bnd-admin/v1/file/batchUploadImage`,
    method: 'post',
    data: data,
    contentType: 'multipart/form-data',
  });
}
export const getNotice = id => axios.get(`/bnd-benefits/noticeInfo/getById/${id}`);
export function uploadVideo(data, config) {
  return axios.request({
    url: `/bnd-admin/v1/file/upload`,
    method: 'post',
    data: data,
    contentType: 'multipart/form-data',
    ...config,
  });
}
